<template>
    <div class="content_panel project_modules ">
        <div class="content_panel_top">
            <h3 class="panel_title">
                <span>{{$t('pageTitle.s0CollectionReport')}}</span>
            </h3>
            <el-form ref="form" :inline="false" class="module_form">
                <el-row>
                    <el-col :span="4">
                        <el-form-item prop="orderId" label="">
                            <el-button type="primary" @click="getTableData">{{$t('common.search')}}</el-button>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
        </div>
        <div class="module_content">
            <div class="content_panel project_modules">
                <div class="table_list">
                    <el-table ref="table" :data="tableData" style="width: 100%;" :highlight-current-row="true">
                        <el-table-column prop="collectionUserName" :label="$t('collection.employeeAccount')" width="280"></el-table-column><!--员工账号-->
                         <el-table-column prop="currentDateTotalLateRepay" :label="$t('collection.s0TodayTotalAmount')" width="280"></el-table-column><!--S0当天到期总金额-->
                        <el-table-column prop="currentDateTotalPayedAmount" :label="$t('collection.s0TodayTotalCollectionAmount')" width="280"></el-table-column><!--S0当天回款总金额-->
                        <el-table-column prop="rate" :label="$t('collection.todayCollectionRatio')" width="280"></el-table-column><!--当天回款比-->
                    </el-table>
                </div>
            </div>
        </div>
    </div>
</template>

<script>

export default {
    
    data(){
        return{
           tableData:[] 
        }
    },
    methods:{
        getTableData(){
             this.$api.collection.statistics.s0RepayRate().then(res => {
                 const {status, data, error} = res;
                if ('1' === status && '00000000' === error && data) {
                    this.tableData = data
                }
             })
        },
    },
    created(){
        this.getTableData()
    }
    
}
</script>
